﻿<%@ Page Title="Unit Management" Language="C#" MasterPageFile="~/App_MasterPages/Aquarius.Master"
    AutoEventWireup="true" CodeBehind="UnitManagement.aspx.cs" Inherits="PanasonicWarranty.UI.UnitManagement" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="../UserControl/ucPaging.ascx" TagName="ucPaging" TagPrefix="uc2" %>
<asp:Content ID="ContentCSS" ContentPlaceHolderID="CssContent" runat="server">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ScriptContent" runat="Server">
    
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="Server">
    <div id="telerikAjax" style="visibility: hidden">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadTreeView">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTreeView" />
                        <telerik:AjaxUpdatedControl ControlID="lblMsg1" />
                        <telerik:AjaxUpdatedControl ControlID="CtrEdit" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="CtrEdit">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="CtrEdit" />
                        <telerik:AjaxUpdatedControl ControlID="RadTreeView" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    </div>
    <div class="row-fluid">
        <div class="span4">
            <div class="head">
                <div class="isw-list">
                </div>
                <h1>
                    Unit System</h1>
                <div class="clear">
                </div>
            </div>
            <div class="block-fluid ui-corner-all" style="overflow: auto; padding: 10px">
                <telerik:RadTreeView ID="RadTreeView" runat="server" OnClientContextMenuItemClicking="onClientContextItemClicking"
                    OnContextMenuItemClick="RadTreeView_ContextItemClick" Skin="WebBlue" Font-Size="12px"
                    Font-Names="Arial" OnNodeClick="RadTreeView_NodeClick">
                    <CollapseAnimation Duration="100" Type="InQuint" />
                    <ContextMenus>
                        <telerik:RadTreeViewContextMenu Skin="WebBlue">
                            <Items>
                                <telerik:RadMenuItem runat="server" Font-Size="13px" ImageUrl="~/images/i_add.gif"
                                    Text="Add new" Value="Add">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Font-Size="13px" ImageUrl="~/images/i_delete.gif"
                                    Text="Delete" Value="Delete">
                                </telerik:RadMenuItem>
                            </Items>
                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                        </telerik:RadTreeViewContextMenu>
                    </ContextMenus>
                    <ExpandAnimation Duration="300" />
                </telerik:RadTreeView>
            </div>
        </div>
        <asp:Panel ID="CtrEdit" CssClass="span8" Visible="false" runat="server" Style="margin-left: 1%">
            <div class="head">
                <div class="isw-list">
                </div>
                <h1>
                    Unit details</h1>
                <asp:HiddenField ID="hdfTreeID" Value="" runat="server" />
                <input type="hidden" id="checkAdd" value="add" />
                <div class="clear">
                </div>
            </div>
            <div class="block-fluid" style="padding: 10px">
                <table border="0" cellpadding="2" cellspacing="2" width="100%" style="border-collapse: collapse">
                    <tr>
                        <td>
                            Unit Name:
                        </td>
                        <td>
                            <asp:TextBox ID="txtUnitName" runat="server" CssClass="inputText"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Parent Unit:
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlParentUnit" runat="server" CssClass="inputText" AutoPostBack="True">
                            </asp:DropDownList>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Zone:
                        </td>
                        <td>
                            <asp:TextBox ID="txtZone" MaxLength="250" runat="server" CssClass="inputText"></asp:TextBox>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Order
                        </td>
                        <td>
                            <asp:TextBox ID="txtOrder" runat="server" onkeypress="return ValidateKeypress(/\d/,event);" />
                        </td>
                        <td style="padding-bottom: 8px; padding-left: 12px">
                            <asp:Button ID="btnSave" CssClass="btn" runat="server" ValidationGroup="Error" OnClick="btnSave_Click" />
                            <asp:Button ID="btnCancel" CssClass="btn" runat="server" Text="Cancel" OnClick="btnCancel_Click" />
                            <asp:Button ID="btnClose" CssClass="btn" runat="server" Text="Close" OnClick="btnClose_Click" />
                        </td>
                    </tr>
                </table>
                <div class="dr">
                    <span></span>
                </div>
            </div>
        </asp:Panel>
    </div>
    <div id="dialog-form" title="Staff information">
        <input type="hidden" name="staffId" id="staffId" />
        <input type="hidden" name="unitId" id="unitId" />
        <table border="0" width="100%" cellpadding="0" cellspacing="0" style="border-collapse: collapse;
            padding-right: 4px">
            <tr>
                <td>
                    Staff Code
                </td>
                <td colspan="2">
                    <input type="text" name="name" id="staffcode" />
                </td>
            </tr>
            <tr>
                <td>
                    Staff Name
                </td>
                <td colspan="2">
                    <input type="text" name="name" id="name" />
                </td>
            </tr>
            <tr>
                <td>
                    Address
                </td>
                <td colspan="2">
                    <textarea rows="2" name="address" id="address"></textarea>
                </td>
            </tr>
            <tr>
                <td>
                    Gender
                </td>
                <td colspan="2">
                    <select name="gender" id="gender">
                        <option value="true">Male</option>
                        <option value="false">Female</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    Level
                </td>
                <td colspan="2">
                    <select id="drdLevel">
                        <option value="1">1</option>
                        <option value="2">2</option>
                        <option value="3">3</option>
                        <option value="4">4</option>
                        <option value="5">5</option>
                        <option value="6">6</option>
                        <option value="7">7</option>
                        <option value="8">8</option>
                        <option value="9">9</option>
                        <option value="10">10</option>
                        <option value="11">11</option>
                        <option value="12">12</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    Type
                </td>
                <td colspan="2">
                    <asp:DropDownList ID="drdType" runat="server" AutoPostBack="false" />
                </td>
            </tr>
            <tr>
                <td>
                    Status
                </td>
                <td colspan="2">
                    <select id="drdStatus">
                        <option value="true">Actived</option>
                        <option value="false">Deactived</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    Phone number
                </td>
                <td>
                    <input type="text" name="phonenumber" id="phonenumber" onkeypress="return ValidateKeypress(/\d/,event);" />
                </td>
                <td style="width: 40px">
                    <input type="button" title="Added phone number" class="ui-button" id="btnAddedPhoneNumber"
                        style="margin: 0 0 8px 8px;" onclick="AddedPhoneNumber(this,'');" />
                </td>
            </tr>
            <tr>
                <td>
                    Unit
                </td>
                <td colspan="2">
                    <asp:DropDownList ID="ddlUnit" runat="server" AutoPostBack="false" />
                </td>
            </tr>
        </table>
        <div style="text-align: center;">
            <span style="color: Red" id="errorMessage"></span>
        </div>
    </div>
    <asp:UpdateProgress ID="udprogress" DisplayAfter="1" runat="server">
        <ProgressTemplate>
            <div class="ui-widget-overlay ui-front">
                <img src="/images/loading.gif" alt="Loading..." style="position: fixed; top: 50%;
                    left: 50%" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <input type="hidden" id="checkfullinfo" value="" />
    <input type="hidden" id="formId" value="UnitManagement" />
</asp:Content>
